#ifndef BIBLE_H_
#define BIBLE_H_

#include <oslib/oslib.h>
#include <string>
#include "objectdraw/objectdraw.h"
#include "Drawing/WordWrapTextBox/WordWrapTextBox.h"
#include "Drawing/ScrollingMenu/ScrollingMenu.h"

using namespace std;

extern DrawingCanvas *syscanvas;

extern WordWrapTextBox bible_pagebox;
extern ScrollingMenu menu;

extern string bible_beginpagetext;

void setupMenu();
void setupTextBox();
void evalSelected();

extern int keyheldcount;

typedef enum page_selection
{
	Book_Selection, New_Testament, Old_Testament,
	Title,Book_Old,Book_New,Book_Chapter
} Page_Selection;

extern Page_Selection currpage;

void onKeyReleased(string key);
void onKeyHeld(string key);
void onKeyPressed(string key);

ArrayList<Option> getOldTestamentOptions();
ArrayList<Option> getNewTestamentOptions();
ArrayList<Option> getBook_OldOptions(string name);
ArrayList<Option> getBook_NewOptions(string name);

class Book
{
	public:
		string name;
		ArrayList<string> chapters;
	
		Book(){}
		Book(string _name, ArrayList<string> _chapters)
		{
			name = _name;
			chapters = _chapters;
		}
		Book(string configloc)
		{
			ArrayList<string> data = ArrayList<string>(getFileData(configloc.c_str()));
			chapters = ArrayList<string>();
			if(data.size() > 0)
			{
				name = data.get(0);
				for(int i = 1; i < data.size(); i++)
					chapters.add(data.get(i));
			}
		}
};

#endif /*BIBLE_H_*/
